#ifndef _MIDDEWARE_H_
#define _MIDDEWARE_H_

#ifdef __cplusplus
extern "C" {
#endif
#include "uart.h"
#include "gps.h"

void ShowThreadInfo();


int TLProtoNetIns(u16 port);

void TLProto_PushTranspUart(int id, u8 *data, int len);

void TLProto_UpdateGps(ifly_serial_gpsinfo_packet_t *pGpsData);
void TLProto_PushMedia(u8 media_type, u8 stream_type, u8 chn, u64 time_stamp, u8 *pData, int len);
void TLProto_Update_BusInfo(ifly_const_cofig_t stBusInfo);
void TLProto_CfgUpdate_TLSrv(ifly_netserver_t stTLSrv);
void TLProto_Update_JTSrv(ifly_jt_srv_t stJTSrv);
void TLProto_CtrlAudioOut(bool bOpen);
void TLProto_AudioPlayNotice(u32 fileID, u8 res);

int TL808_Init();
int TL808_SetDevID(const char *dev_id);
int TL808_Start(const char *addr_str, u16 port);
int TL808_UpdateGps(ifly_serial_gpsinfo_packet_t *pGpsData);
int TL808_UpdateRfid(const char *id);
#ifdef USE_ETH_COMMUNICATION
int ETHTransIns(u16 port);
int ETHTrans_SendData(u8 cmd, u8 *pData, u8 len);
int ETHTrans_UpdateAd(LCD_AdInfo_t stAd);
int ETHTrans_UpdateDriverInfo(LCD_DriverInfo_t stDriver);
int ETHTrans_UpdateGps(ifly_serial_gpsrmc_packet_t *pGpsRmc);
int ETHTrans_UpdateCarStatus(bool bLoad);
int ETHTrans_GetClintNum(void);
#endif

#ifdef __cplusplus
}
#endif


#endif
